#include "waypoint.h"

waypoint::waypoint(QPoint Pos):_Pos(Pos),_next_waypoint(NULL){

}

void waypoint::set_next_point(waypoint *next_way_point){
    _next_waypoint=next_way_point;
}


waypoint* waypoint::next_waypoint()const{
    return _next_waypoint;
}

const QPoint waypoint::pos()const{
    return _Pos;
}

void waypoint::draw(QPainter *painter)
{
    painter->save();
    painter->setPen(Qt::green);
    painter->drawEllipse(_Pos, 6, 6);
    painter->drawEllipse(_Pos, 2, 2);

    if (_next_waypoint)
        painter->drawLine(_Pos, _next_waypoint->_Pos);
    painter->restore();
}
